﻿using System.Windows;
using System.Windows.Controls;

namespace StoryDesigner.Controls
{
	public class StoryArcControl : StoryControlBase
	{
		#region NewTaskButtonVisibility DependencyProperty

		public static readonly DependencyProperty NewTaskButtonVisibilityProperty =
			DependencyProperty.Register
				(
					"NewTaskButtonVisibility",
					typeof (Visibility),
					typeof (StoryArcControl),
					new PropertyMetadata(Visibility.Collapsed)
				);

		public Visibility NewTaskButtonVisibility
		{
			get { return (Visibility) GetValue(NewTaskButtonVisibilityProperty); }
			set { SetValue(NewTaskButtonVisibilityProperty, value); }
		}

		#endregion

		private Button _btnNewTask;

		public StoryArcControl()
		{
			DefaultStyleKey = typeof (StoryArcControl);
		}

		public override void OnApplyTemplate()
		{
			base.OnApplyTemplate();
			_btnNewTask = GetTemplateChild("btnNewTask") as Button;
			if (_btnNewTask != null)
			{
				_btnNewTask.Click += _btnNewTask_Click;
			}
		}

		private void _btnNewTask_Click(object sender, RoutedEventArgs e)
		{
		}
	}
}